import {reactive} from 'vue'
import Pagination from '@/components/Pagination.vue'
import {PaginationComponentType} from '@/type/paginationType'
export const usePagination = () => {
  const pagination = reactive<PaginationComponentType>({
    pageSize: 10,
    current: 1,
    total: 0
  })

  function setPagination (total: number, current: number, pageSize: number) {
    pagination.total = total
    pagination.current = current
    pagination.pageSize = pageSize
  }


  return {
    pagination,
    setPagination,
    Pagination
  }
}
